/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package databook.util;

/**
 *
 * @author zach
 */
public class DatabookLib {

    public static String[] concatStringArrays(String[] arr1, String[] arr2) {
        String[] newArr = new String[arr1.length + arr2.length];
        for (int i = 0; i < newArr.length; i++) {
            newArr[i] = (i < arr1.length ? arr1[i] : arr2[i-arr1.length]);
        }
        return newArr;
    }
    
    public static String arrayJoin(Object[] arr, String del) {
        if (arr.length == 0) return "";
        String str = arr[0].toString();
        for (int i = 1; i < arr.length; i++) {
            str += del + arr[i];
        }
        return str;
    }
}
